package TravelAgent;

public class Preferences {
	private String startDate;
	private String finishDate;
	private String hotel;
	private int peopleNumber;
	
	//preference gonderme protokolu: startDate:finishDate:hotel:peopleNumber
	public void SplitPreferences(String s)
	{
		String[] array = s.split(":");
		if (array.length != 4)
		{
			System.out.println("bilgi yanlis gelmis");  //
			return;
		}
		startDate = array[0];
		finishDate = array[1];
		hotel = array[2];
		peopleNumber = Integer.parseInt(array[3]);
	}
	
	public String GetStartDate()
	{
		return startDate;
	}
	
	public String GetFinishDate()
	{
		return finishDate;		
	}
	
	public String GetHotel()
	{
		return hotel;
	}
	
	public int GetPeopleNumber()
	{
		return peopleNumber;
	}
}
